# coding:utf8
from flask import Flask
from data_architecture import architecture
from user import user, login_manager
from data_monitor import monitor
from data_manage import data_manage
from data_query import query
from data_report import report
from utilities.cache_config import cache
# from utilities.web_socket import socketio

app = Flask(__name__, static_folder='static', template_folder='templates')

app.secret_key = 's3cr3t'
login_manager.init_app(app)
cache.init_app(app)

app.register_blueprint(architecture)
app.register_blueprint(user)
app.register_blueprint(data_manage)
app.register_blueprint(monitor)
app.register_blueprint(query)
app.register_blueprint(report)
# socketio.init_app(app, async_mode=async_mode)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8032, threaded=True, debug=True)
